﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Leafing.Data;
using Leafing.Extra.Logging;
using Leafing.Core;
using Leafing.Core.Logging;

public partial class frmLog : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.User.Identity.IsAuthenticated)
        {
            Response.Redirect("Login.aspx");
        }
        Logger.Default.Info(string.Format("{0},查看了系统日志", this.User.Identity.Name));
        string strSql = @"SELECT  Id
      ,Type
      ,Thread
      ,Name
      ,Message
      ,Exception
      ,CreatedOn
  FROM LeafingLog order by Id DESC ";
        this.GridView1.DataSource = DbEntry.Provider.ExecuteDataset(strSql);
        //this.GridView1.DataSource = DbEntry.From<LeafingLog>().Where(Condition.Empty).Select();
        this.GridView1.DataBind();
    }



}